from aip import AipSpeech

""" 你的 APPID AK SK """
APP_ID = '16436279'
API_KEY = 'Y4A4TuCxAzrx6haB8PMuQRCP'
SECRET_KEY = 'TYGXDfVQvC4degzeZvZnYhAfx5ubq1y7'

client = AipSpeech(APP_ID, API_KEY, SECRET_KEY)

# 读取文件
def get_file_content(filePath):
    with open(filePath, 'rb') as fp:
        return fp.read()

# 识别本地文件
res = client.asr(get_file_content('wyn.wma.pcm'), 'pcm', 16000, {
    'dev_pid': 1536,
})

print(res)
print(res.get("result")[0])